<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>商品评价</title>
    <link rel="icon" href="__ROOT__/public/lcbook.ico" type="image/x-icon">
    <link rel="stylesheet" href="__ROOT__/public/static/css/common.css">
    <link rel="stylesheet" href="__ROOT__/public/static/css/header.css">
    <link rel="stylesheet" href="__ROOT__/public/static/css/popBox.css">
    <link rel="stylesheet" href="__ROOT__/public/static/css/evaluate.css">
    <!-- fontawesome字体 -->
    <link rel="stylesheet" href="__ROOT__/public/static/font/font-awesome.min.css">
</head>

<body>
    <!-- 头部 -->
    {include file="./public/common/header.html"/}

    <div id="evaluate">
        <form action="{:url('order/doEvaluate')}" method="post">

            {foreach $results as $shop}
            <div class="evaluateBox">
                <div class="picBox">
                    <img src="__ROOT__/public/static/image/{$shop.picturem}" alt="">
                </div>

                <div class="ct">
                    <div class="bq" data-id="{$shop.SLID}">
                        <span>专业性强！紧跟技术潮流！</span>
                        <span>实用性强！</span>
                        <span>对我的帮助很大！</span>
                        <span>商品包装完美！</span>
                    </div>

                    <textarea name="pjcontent{$shop.SLID}" cols="30" rows="10" placeholder="请输入您的评价吧！"></textarea>

                </div>

            </div>
            {/foreach}
            <input type="hidden" name="orderID" value="{$results[0]['orderID']}">

            <div class="submitBox">
                <button>提交评价</button>

            </div>
        </form>
    </div>
    <script src="__ROOT__/public/static/js/jquery-1.8.3.min.js"></script>
    <script src="__ROOT__/public/static/js/header.js"></script>
    <script>
        $(function () {
            //评价用语被点击
            $('span').click(function () {
                let id = $(this).parent().data('id');
                let content = $(this).text();
                let c = $('textarea[name="pjcontent' + id + '"]').val();
                $('textarea[name="pjcontent' + id + '"]').val(c + content);
            });
        });
    </script>
</body>

</html>